package cn.iocoder.yudao.module.pplan.dal.mysql.recipeaddrecord;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.pplan.controller.admin.recipeaddrecord.vo.RecipeAddRecordPageReqVO;
import cn.iocoder.yudao.module.pplan.dal.dataobject.recipeaddrecord.RecipeAddRecordDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 生产计划-加餐记录 Mapper
 *
 * @author yisla
 */
@Mapper
public interface RecipeAddRecordMapper extends BaseMapperX<RecipeAddRecordDO> {

    default PageResult<RecipeAddRecordDO> selectPage(RecipeAddRecordPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<RecipeAddRecordDO>()
                .eqIfPresent(RecipeAddRecordDO::getFlightNo, reqVO.getFlightNo())
                .eqIfPresent(RecipeAddRecordDO::getRecordDate, reqVO.getRecordDate())
                .orderByDesc(RecipeAddRecordDO::getId));
    }

}